package com.dragon.modules.yuegou.query.lot;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.lot.ActivityJoinEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * 会员参与活动信息表 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-10-29 16:09:28
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class ActivityJoinQuery extends ActivityJoinEntity implements Query<ActivityJoinEntity> {

    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 会员ID查询条件 */
	@JsonUnwrapped(prefix = "memberId")
	private Condition<String> memberIdCondition;

    /** 活动ID查询条件 */
	@JsonUnwrapped(prefix = "activityId")
	private Condition<String> activityIdCondition;

    /** 会员头像查询条件 */
	@JsonUnwrapped(prefix = "memberHeadImg")
	private Condition<String> memberHeadImgCondition;

    /** 会员昵称查询条件 */
	@JsonUnwrapped(prefix = "memberNickName")
	private Condition<String> memberNickNameCondition;

    /** 会员分享次数查询条件 */
	@JsonUnwrapped(prefix = "shareNum")
	private Condition<Integer> shareNumCondition;

    /** 订单号查询条件 */
	@JsonUnwrapped(prefix = "orderNo")
	private Condition<String> orderNoCondition;

    /** 是否中奖 0-未中奖；1-已中奖查询条件 */
	@JsonUnwrapped(prefix = "isPrize")
	private Condition<Boolean> isPrizeCondition;

    /** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public ActivityJoinQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public ActivityJoinQuery(ActivityJoinEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public ActivityJoinQuery(ActivityJoinQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.memberIdCondition != null) {
			this.memberIdCondition = other.memberIdCondition.copy();
		}
		if(other.activityIdCondition != null) {
			this.activityIdCondition = other.activityIdCondition.copy();
		}
		if(other.memberHeadImgCondition != null) {
			this.memberHeadImgCondition = other.memberHeadImgCondition.copy();
		}
		if(other.memberNickNameCondition != null) {
			this.memberNickNameCondition = other.memberNickNameCondition.copy();
		}
		if(other.shareNumCondition != null) {
			this.shareNumCondition = other.shareNumCondition.copy();
		}
		if(other.orderNoCondition != null) {
			this.orderNoCondition = other.orderNoCondition.copy();
		}
		if(other.isPrizeCondition != null) {
			this.isPrizeCondition = other.isPrizeCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<ActivityJoinEntity> toQueryWrapper() {
		QueryWrapper<ActivityJoinEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (memberIdCondition != null) {
			memberIdCondition.toWrapper(wrapper, COL_MEMBER_ID);
		}
		if (activityIdCondition != null) {
			activityIdCondition.toWrapper(wrapper, COL_ACTIVITY_ID);
		}
		if (memberHeadImgCondition != null) {
			memberHeadImgCondition.toWrapper(wrapper, COL_MEMBER_HEAD_IMG);
		}
		if (memberNickNameCondition != null) {
			memberNickNameCondition.toWrapper(wrapper, COL_MEMBER_NICK_NAME);
		}
		if (shareNumCondition != null) {
			shareNumCondition.toWrapper(wrapper, COL_SHARE_NUM);
		}
		if (orderNoCondition != null) {
			orderNoCondition.toWrapper(wrapper, COL_ORDER_NO);
		}
		if (isPrizeCondition != null) {
			isPrizeCondition.toWrapper(wrapper, COL_IS_PRIZE);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回会员ID查询条件
	 * 
	 * @return memberIdCondition 会员ID查询条件
	 */
	public Condition<String> memberId() {
		this.memberIdCondition = new Condition<>();
		return this.memberIdCondition;
	}
	
	/**
	 * 获取会员ID查询条件
	 * 
	 * @return memberIdCondition 会员ID查询条件
	 */
	public Condition<String> getMemberIdCondition() {
		return memberIdCondition;
	}

	/**
	 * 设置会员ID查询条件
	 * 
	 * @param memberIdCondition 会员ID查询条件
	 */
	public void setMemberIdCondition(Condition<String> memberIdCondition) {
		this.memberIdCondition = memberIdCondition;
	}

	/**
	 * 构造并返回活动ID查询条件
	 * 
	 * @return activityIdCondition 活动ID查询条件
	 */
	public Condition<String> activityId() {
		this.activityIdCondition = new Condition<>();
		return this.activityIdCondition;
	}
	
	/**
	 * 获取活动ID查询条件
	 * 
	 * @return activityIdCondition 活动ID查询条件
	 */
	public Condition<String> getActivityIdCondition() {
		return activityIdCondition;
	}

	/**
	 * 设置活动ID查询条件
	 * 
	 * @param activityIdCondition 活动ID查询条件
	 */
	public void setActivityIdCondition(Condition<String> activityIdCondition) {
		this.activityIdCondition = activityIdCondition;
	}

	/**
	 * 构造并返回会员头像查询条件
	 * 
	 * @return memberHeadImgCondition 会员头像查询条件
	 */
	public Condition<String> memberHeadImg() {
		this.memberHeadImgCondition = new Condition<>();
		return this.memberHeadImgCondition;
	}
	
	/**
	 * 获取会员头像查询条件
	 * 
	 * @return memberHeadImgCondition 会员头像查询条件
	 */
	public Condition<String> getMemberHeadImgCondition() {
		return memberHeadImgCondition;
	}

	/**
	 * 设置会员头像查询条件
	 * 
	 * @param memberHeadImgCondition 会员头像查询条件
	 */
	public void setMemberHeadImgCondition(Condition<String> memberHeadImgCondition) {
		this.memberHeadImgCondition = memberHeadImgCondition;
	}

	/**
	 * 构造并返回会员昵称查询条件
	 * 
	 * @return memberNickNameCondition 会员昵称查询条件
	 */
	public Condition<String> memberNickName() {
		this.memberNickNameCondition = new Condition<>();
		return this.memberNickNameCondition;
	}
	
	/**
	 * 获取会员昵称查询条件
	 * 
	 * @return memberNickNameCondition 会员昵称查询条件
	 */
	public Condition<String> getMemberNickNameCondition() {
		return memberNickNameCondition;
	}

	/**
	 * 设置会员昵称查询条件
	 * 
	 * @param memberNickNameCondition 会员昵称查询条件
	 */
	public void setMemberNickNameCondition(Condition<String> memberNickNameCondition) {
		this.memberNickNameCondition = memberNickNameCondition;
	}

	/**
	 * 构造并返回会员分享次数查询条件
	 * 
	 * @return shareNumCondition 会员分享次数查询条件
	 */
	public Condition<Integer> shareNum() {
		this.shareNumCondition = new Condition<>();
		return this.shareNumCondition;
	}
	
	/**
	 * 获取会员分享次数查询条件
	 * 
	 * @return shareNumCondition 会员分享次数查询条件
	 */
	public Condition<Integer> getShareNumCondition() {
		return shareNumCondition;
	}

	/**
	 * 设置会员分享次数查询条件
	 * 
	 * @param shareNumCondition 会员分享次数查询条件
	 */
	public void setShareNumCondition(Condition<Integer> shareNumCondition) {
		this.shareNumCondition = shareNumCondition;
	}

	/**
	 * 构造并返回订单号查询条件
	 * 
	 * @return orderNoCondition 订单号查询条件
	 */
	public Condition<String> orderNo() {
		this.orderNoCondition = new Condition<>();
		return this.orderNoCondition;
	}
	
	/**
	 * 获取订单号查询条件
	 * 
	 * @return orderNoCondition 订单号查询条件
	 */
	public Condition<String> getOrderNoCondition() {
		return orderNoCondition;
	}

	/**
	 * 设置订单号查询条件
	 * 
	 * @param orderNoCondition 订单号查询条件
	 */
	public void setOrderNoCondition(Condition<String> orderNoCondition) {
		this.orderNoCondition = orderNoCondition;
	}

	/**
	 * 构造并返回是否中奖 0-未中奖；1-已中奖查询条件
	 * 
	 * @return isPrizeCondition 是否中奖 0-未中奖；1-已中奖查询条件
	 */
	public Condition<Boolean> isPrize() {
		this.isPrizeCondition = new Condition<>();
		return this.isPrizeCondition;
	}
	
	/**
	 * 获取是否中奖 0-未中奖；1-已中奖查询条件
	 * 
	 * @return isPrizeCondition 是否中奖 0-未中奖；1-已中奖查询条件
	 */
	public Condition<Boolean> getIsPrizeCondition() {
		return isPrizeCondition;
	}

	/**
	 * 设置是否中奖 0-未中奖；1-已中奖查询条件
	 * 
	 * @param isPrizeCondition 是否中奖 0-未中奖；1-已中奖查询条件
	 */
	public void setIsPrizeCondition(Condition<Boolean> isPrizeCondition) {
		this.isPrizeCondition = isPrizeCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 * 
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

}
